package com.itheima.socket.tcp.demo04;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.TimeUnit;

public class ServerDemo04 {

    public static void main(String[] args) throws IOException, InterruptedException {

        ServerSocket serverSocket = new ServerSocket(3333);
        Socket socket = serverSocket.accept();
        TimeUnit.SECONDS.sleep(15);
        socket.close();
        serverSocket.close();
    }
}
